package cn.dreamblog.service.impl;

import cn.dreamblog.dao.GoodstatusDao;
import cn.dreamblog.pojo.Goodstatus;
import cn.dreamblog.service.GoodstatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("goodstatusService")
public class GoodstatusServiceImpl implements GoodstatusService {
    @Autowired
    private GoodstatusDao goodstatusDao;
    @Override
    public Integer insertGood(Goodstatus good) {
        return goodstatusDao.insertGood(good);
    }

    @Override
    public Integer selectGoods(int blog_id) {
        return goodstatusDao.selectGoods(blog_id);
    }

    @Override
    public Goodstatus findGoodstatus(Goodstatus goodstatus) {
        return (Goodstatus) goodstatusDao.findGoodstatus(goodstatus);
    }

    @Override
    public Integer updateGoodstatus(int blog_id, int user_id, int status) {
        return goodstatusDao.updateGoodstutus(blog_id, user_id, status);
    }
}
